import Http, {HttpParamsProps, ReqProps} from "@/common/http";
import {BaseEntitys} from "@/common/httptypes";


//后期需整改数据-没用的删掉
export type EnptListEntity = {
  id: string
  address?: string
  businessScope?: string
  companyCode?: string
  companyDesc?: string
  companyDescFile?: string
  companyFlag?: string
  companyName?: string
  deptId?: string
  empCount?: string
  legalPerson?: string
  mobile?: string
  natureFile?: string
  permit?: string
  person?: string
  salesAmount?: string
  taxAmount?: string
} & BaseEntitys

class EnptList {
    RowKey = "id"
    EDIT = "companyEdit"
    ADD = "companyAdd"
    DEL = "companyDelete"
    DET = "companyDetail"
    
    MAPPING = {companyEdit: "编辑企业", companyAdd: "新增企业" , companyDetail:"企业详情"}


    selectTablePage(props: HttpParamsProps): Promise<Response> {
        return Http.get("/company/select", props)
    }

    doEdit(props: ReqProps<void>) {
        Http.doPost("/company/updateById", props)
    }
    doSave(props: ReqProps<void>) {
        Http.doPost("/company/save", props)
    }

    delete(props: ReqProps<void>) {
        Http.doDelete("/company/deleteById", props)
    }

    detail(props: ReqProps<void>) {
        Http.doGet("/company/getById", props)
    }


}

// eslint-disable-next-line import/no-anonymous-default-export
export default new EnptList()